﻿@model HomeViewModel
@{
    ViewBag.Title = "Site Administration";
    ViewBag.Tab = "Admin";
}

<section role="main" class="container main-container page-admin-index">
    <h1>Site Administration</h1>
    <ul class="list-unstyled">
        @if (Model.ShowDatabaseAdmin)
        {
            <li>
                <h2>
                    <a href="~/Admin/Database">
                        <i class="ms-Icon ms-Icon--Database"></i>
                        <span>Database Administration</span>
                    </a>
                </h2>
                <p>
                    Get direct access to the database to manipulate Users, Packages, etc. USE WITH CAUTION.
                </p>
            </li>
        }
        <li>
            <h2>
                <a href="~/Admin/Errors.axd">
                    <i class="ms-Icon ms-Icon--Error"></i>
                    <span>Error Logs</span>
                </a>
            </h2>
            <p>
                View Application Error Logs.
            </p>
        </li>
        <li>
            <h2>
                <a href="@Url.Action(actionName: "Index", controllerName: "LockPackage")">
                    <i class="ms-Icon ms-Icon--Lock"></i>
                    <span>Lock Packages</span>
                </a>
            </h2>
            <p>
                Lock and unlock packages on the gallery.
            </p>
        </li>
        <li>
            <h2>
                <a href="@Url.Action(actionName: "Index", controllerName: "Delete")">
                    <i class="ms-Icon ms-Icon--Delete"></i>
                    <span>Delete Packages</span>
                </a>
            </h2>
            <p>
                Delete packages from the gallery.
            </p>
        </li>
        <li>
            <h2>
                <a href="@Url.Action(actionName: "Index", controllerName: "Lucene")">
                    <i class="ms-Icon ms-Icon--DocumentSearch"></i>
                    <span>Lucene Index Maintenance</span>
                </a>
            </h2>
            <p>
                Maintain the Lucene full-text search index.
            </p>
        </li>
        <li>
            <h2>
                <a href="@Url.Action(actionName: "Index", controllerName: "SupportRequest")">
                    <i class="ms-Icon ms-Icon--ActivityFeed"></i>
                    <span>Support Requests</span>
                </a>
            </h2>
            <p>
                Handle support requests
            </p>
        </li>
        <li>
            <h2>
                @ViewHelpers.PostLink(
                    this,
                    formId: "clear-content-cache-form",
                    htmlContent: @<text>
                        <i class="ms-Icon ms-Icon--Refresh"></i>
                        <span>Clear Content Cache</span>
                    </text>,
                    actionName: "ClearContentCache",
                    controllerName: "Home",
                    role: string.Empty,
                    area: "Admin")
            </h2>
            <p>
                Clear Content Cache
            </p>
        </li>
        <li>
            <h2>
                <a href="@Url.Action(actionName: "Index", controllerName: "SecurityPolicy")">
                    <i class="ms-Icon ms-Icon--SecurityGroup"></i>
                    <span>Security Policies</span>
                </a>
            </h2>
            <p>
                Manage User Security Policies
            </p>
        </li>
        <li>
            <h2>
                <a href="@Url.Action(actionName: "Index", controllerName: "ReservedNamespace")">
                    <i class="ms-Icon ms-Icon--Shield"></i>
                    <span>Reserve Namespace</span>
                </a>
            </h2>
            <p>
                Manage Namespace Reservation
            </p>
        </li>
        @if (Model.ShowValidation)
        {
            <li>
                <h2>
                    <a href="@Url.Action(actionName: "Index", controllerName: "Validation")">
                        <i class="ms-Icon ms-Icon--CheckboxComposite"></i>
                        <span>Validation</span>
                    </a>
                </h2>
                <p>
                    Inspect Package Validations
                </p>
            </li>
            <li>
                <h2>
                    <a href="@Url.Action(actionName: "Index", controllerName: "Revalidation")">
                        <i class="ms-Icon ms-Icon--Redo"></i>
                        <span>Revalidation Job</span>
                    </a>
                </h2>
                <p>
                    Inspect the Revalidation job
                </p>
            </li>
        }
        <li>
            <h2>
                <a href="@Url.Action(actionName: "Index", controllerName: "DeleteAccount")">
                    <i class="ms-Icon ms-Icon--Delete"></i>
                    <span>Delete Account</span>
                </a>
            </h2>
            <p>
                Manage Account Deletion
            </p>
        </li>
        <li>
            <h2>
                <a href="@Url.Action(actionName: "Index", controllerName: "Features" )">
                    <i class="ms-Icon ms-Icon--Flag"></i>
                    <span>Feature Flags</span>
                </a>
            </h2>
            <p>
                Manage which features are enabled
            </p>
        </li>
        <li>
            <h2>
                <a href="@Url.Action(actionName: "Index", controllerName: "SiteAdmins")">
                    <i class="ms-Icon ms-Icon--Admin"></i>
                    <span>Site Admins</span>
                </a>
            </h2>
            <p>
                Manage site admins
            </p>
        </li>
        <li>
            <h2>
                <a href="@Url.Action(actionName: "Index", controllerName: "ApiKeys")">
                    <i class="ms-Icon ms-Icon--Permissions"></i>
                    <span>API Keys</span>
                </a>
            </h2>
            <p>
                Manage and Revoke API Keys
            </p>
        </li>
    </ul>
</section>
